@include('admin.public.head')

<style type="text/css">
    .inner_btn {
        background: #19a97b;
        color: white;
        padding: 5px 8px;
        border-radius: 2px;
    }
</style>

<div class="ibox-title">
    <h5>用戶充值审核</h5>
</div>

<div class="ibox-content">
    <div class="row">
        <div class="col-sm-12 pull-right m-b-xs">
            <form action="">
                <div class="col-sm-1  m-b-xs text-center pull-right">
                    <button type="submit" class="btn btn-sm btn-primary">搜索</button> </span>
                </div>

                @include('admin.public.common.where_time_input')

                <div class="col-sm-2 text-center pull-right">
                    <input type="text" name="sear_value" value="{{$sear_value}}" placeholder="用戶名稱" class="input form-control">
                </div>

                <div class="col-sm-2 text-center pull-right">
                    <select class="form-control" name="status">
                        <option value="">选择审核状态</option>
                        <option value="1" @if($status == '1') selected = "selected" @endif>待审核</option>
                        <option value="2" @if($status == '2') selected = "selected" @endif>审核通过</option>
                        <option value="3" @if($status == '3') selected = "selected" @endif>审核不通过</option>
                    </select>
                </div>

            </form>
        </div>
    </div>
    <table class="table table-bordered">
        <thead>
        <tr>
            <th>用戶頭像</th>
            <th>用戶名稱</th>
            <th>证明</th>
            <th>積分</th>
            <th>审核状态</th>
            <th>备注</th>
            <th>套餐ID</th>
            <th>套餐名稱</th>
            <th>支付方式ID</th>
            <th>支付方式</th>
            <th>提交时间</th>
            <th>操作</th>
        </tr>
        </thead>

        <tbody>
        @foreach ($result as $v)
            <tr>
                <td>
                    <img src="{{$v->user->head_img??''}}">
                </td>
                <td>
                    {{$v->user->nickname??''}}
                </td>
                <td>
                    <img src="{{$v->proof_img??''}}" height="200" width="200">
                </td>
                <td>{{$v->integral??''}}</td>
                <td>
                        @if($v->status === 1)
                        待审核
                        @elseif($v->status == 2)
                        通过
                        @elseif($v->status == 3)
                        拒绝
                        @endif
               </td>
                <td>
                    {{$v->remarks??''}}
                </td>

                <td>
                    {{$v->integral_plan_id??''}}
                </td>
                <td>
                    {{$v->integral_plan->title??''}}
                </td>
                <td>
                    {{$v->pay_type_id??''}}
                </td>
                <td>
                    {{$v->pay_type->pay_name??''}}
                </td>
                <td>
                    {{$v->created_at??''}}
                </td>
                <td>
                    @if(permission('/user_integral_edit', $user['right_list'], $user['get_routes']))
                    @if($v->status == 1)
                    <div class="btn-group">
                        <a  class="btn btn-primary btn-sm dropdown-toggle" href="/user_integral_edit/{{$v->id}}">审核
                        </a>&nbsp;&nbsp;
                    </div>
                    @endif
                    @endif
                </td>
            </tr>
        @endforeach
        </tbody>
        {{ $result->appends(Request::except ('page'))->links() }}
    </table>
    {{ $result->appends(Request::except ('page'))->links() }}
</div>
<script>

</script>
